<!DOCTYPE html>
<html lang="en">
<head>
    <meta data-th-replace="~{fragments :: meta-charset}">
    <meta data-th-replace="~{fragments :: meta-viewport}">
    <link data-th-replace="~{fragments :: favicon}">
    <title>注册</title>
    <link href="/favicon.ico" rel="shortcut icon"/>
    <link data-th-replace="~{fragments :: bootstrap-css}" />
    <link data-th-replace="~{fragments :: common-css}"/>
</head>
<body>

<nav data-th-replace="~{fragments :: header}"></nav>

<main role="main" class="container">
    <form style="margin: 16px auto; max-width: 300px;" method="post" data-th-action="@{/user/register}">
        <div class="form-group">
            <input type="text" class="form-control" name="username" aria-describedby="usernameHelp" placeholder="请输入用户名">
            <small id="usernameHelp" class="form-text text-muted">用户名由大小写字母和数字组成</small>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="password" aria-describedby="passwordHelp" placeholder="请输入密码">
            <small id="passwordHelp" class="form-text text-muted">密码由大小写字母和数字组成</small>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="repassword" aria-describedby="repasswordHelp" placeholder="请再次输入密码">
            <small id="repasswordHelp" class="form-text text-muted">两次输入密码应一致</small>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="invitationCode" aria-describedby="invitationCodeHelp" placeholder="请输入邀请码">
            <small id="invitationCodeHelp" class="form-text text-muted">如果你没有邀请码，就此打住吧</small>
        </div>
        <div class="alert alert-danger" role="alert" data-th-if="${errorMsg != null && errorMsg != ''}" data-th-text="${errorMsg}">errorMsg</div>
        <button type="submit" class="btn btn-primary btn-block">注册</button>
    </form>
</main>

<footer data-th-replace="~{fragments :: footer}"></footer>
</body>
</html>